#pragma once
#include <cstdint>
#include <cerrno>

enum class socket_status : int64_t
{
    ok = 0,
    denied = EACCES,
    again = EAGAIN,
    block = EWOULDBLOCK,
    already = EALREADY,
    bad = EBADF,
    reset = ECONNRESET,
    no_peer = EDESTADDRREQ,
    memfault = EFAULT,
    interrupted = EINTR,
    is_connection = EISCONN,
    message_size = EMSGSIZE,
    output_queue_full = ENOBUFS,
    no_memory = ENOMEM,
    not_connected = ENOTCONN,
    not_socket = ENOTSOCK,
    not_supported = EOPNOTSUPP,
    pipe_closed = EPIPE,
    ssl_error = -3
};